package Print;

import java.io.IOException;
import java.io.PrintStream;

public class MyPrintStream {
    public static void main(String[] args) {
        try(PrintStream printStream = new PrintStream("D:\\software\\code\\2023_java\\2023_java_code\\code_24_4_26\\src\\Print\\TT")
        ){
            //打印啥就会输出啥
            printStream.println(111);
            printStream.println( );
            printStream.println('A');
            printStream.println("你好世界");
            printStream.println("你好小鸭");
            printStream.println();
            printStream.println("你好小扳");

            //支持输出字节数据
            printStream.write(33);
            printStream.write('A');
            printStream.write("你好小狗".getBytes());

        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
